package com.hongning.railway.entity.reqbean;

import android.text.TextUtils;

import java.io.Serializable;
import java.util.List;
import java.util.Random;

public class ThreesessionSanDoneLessonBean implements Serializable {

    /**
     * pagenum : 1
     * pagesize : 2
     * count : 41
     * meetingname : null
     * meetingtype : null
     * signcolumn : null
     * data : [{"id":"20190811223533970589","meetingname":"救护","meetingtype":"支部党委会","meetingstarttime":"2019-08-11 22:34:48","meetingstoptime":"2019-08-19 00:00:00","meetingplace":"自主","meetingissue":null,"signcolumn":"进行中","meeradd":[{"groupid":"101","groupname":"党支部","staffname":[{"staffname":"张三","staffid":"1001"}]},{"groupid":"101001","groupname":"机关第一党支部","staffname":[{"staffname":"李四","staffid":"1002"}]}],"attachinfos":[]},{"id":"20190811203952164005","meetingname":"新增胡i","meetingtype":"党课","meetingstarttime":"2019-08-11 20:39:16","meetingstoptime":"2019-08-14 00:00:00","meetingplace":"啊士大夫似的","meetingissue":null,"signcolumn":"进行中","meeradd":[{"groupid":"101","groupname":"党支部","staffname":[{"staffname":"张三","staffid":"1001"}]},{"groupid":"101001","groupname":"机关第一党支部","staffname":[{"staffname":"李四","staffid":"1002"},{"staffname":"admin","staffid":"admin"}]},{"groupid":"101002","groupname":"机关第二党支部","staffname":[{"staffname":"王五","staffid":"1003"}]}],"attachinfos":[{"id":"20190811205345164806","filepath":"/nbfp/templates/file/2019/08/11/目录页_详情页.jpg","orginname":"目录页_详情页.jpg"},{"id":"20190811205346168439","filepath":"/nbfp/templates/file/2019/08/11/书籍详情.jpg","orginname":"书籍详情.jpg"}]}]
     */

    private int pagenum;
    private int pagesize;
    private int count;
    private String meetingname;
    private String meetingtype;
    private String signcolumn;
    private List<DataBean> data;



    public int getPagenum() {
        return pagenum;
    }

    public void setPagenum(int pagenum) {
        this.pagenum = pagenum;
    }

    public int getPagesize() {
        return pagesize;
    }

    public void setPagesize(int pagesize) {
        this.pagesize = pagesize;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public Object getMeetingname() {
        return meetingname;
    }

    public void setMeetingname(String meetingname) {
        this.meetingname = meetingname;
    }

    public String getMeetingtype() {
        return meetingtype;
    }

    public void setMeetingtype(String meetingtype) {
        this.meetingtype = meetingtype;
    }

    public String getSigncolumn() {
        return signcolumn;
    }

    public void setSigncolumn(String signcolumn) {
        this.signcolumn = signcolumn;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements Serializable{
        /**
         * id : 20190811223533970589
         * meetingname : 救护
         * meetingtype : 支部党委会
         * meetingstarttime : 2019-08-11 22:34:48
         * meetingstoptime : 2019-08-19 00:00:00
         * meetingplace : 自主
         * meetingissue : null
         * signcolumn : 进行中
         * meeradd : [{"groupid":"101","groupname":"党支部","staffname":[{"staffname":"张三","staffid":"1001"}]},{"groupid":"101001","groupname":"机关第一党支部","staffname":[{"staffname":"李四","staffid":"1002"}]}]
         * attachinfos : []
         */

        private String id;
        private String meetingname;
        private String meetingtype;
        private String meetingstarttime;
        private String meetingstoptime;
        private String meetingplace;
        private String meetingissue;
        private String signcolumn;
        private String signhtml;
        private List<MeeraddBean> meeradd;
        private List<AttachinfoBean> attachinfos;
        private String showType;//拼接显示使用
        private String showTime;//拼接显示使用
        private String showAddress;//拼接显示使用
        private String type;//拼接显示使用

        private String name;//会议名称
        private String yhzb;//与会支部
        private String yhmd;//与会名单

        private String nameItem;//会议名称
        private String itemContent;//会议内容
        private String itemType;//
          private boolean itemTypeIsShow;

        public boolean isItemTypeIsShow() {
            return  (signcolumn.equals("0")||signhtml.equals("99"));
        }

        public void setItemTypeIsShow(boolean itemTypeIsShow) {
            this.itemTypeIsShow = itemTypeIsShow;
        }

        public String getItemType() {
            return signcolumn.equals("0")?"NEW":(signhtml.equals("99")?"撤销":"");
        }

        public void setItemType(String itemType) {
            this.itemType = itemType;
        }

        public String getItemContent() {
            String tem="";
            if (meetingtype!=null&& !TextUtils.isEmpty(meetingtype))
            {
                tem="【"+meetingtype+"】 ";
            }
            return "【"+getShowTime()+"】,在"+"【"+meetingplace+"】,召开"+tem+meetingname;
        }

        public void setItemContent(String itemContent) {
            this.itemContent = itemContent;
        }

        public String getNameItem() {
            return "(会议名称)"+meetingname;
        }

        public void setNameItem(String nameItem) {
            this.nameItem = nameItem;
        }

        public String getName() {
            return "会议名称："+meetingname;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getYhzb() {
            String temName="";
            if (meeradd!=null)
            {

                for (MeeraddBean meeraddBean:meeradd)
                {
                    if (!temName.contains(meeraddBean.groupname))
                    {
                        temName+=(","+meeraddBean.groupname);
                    }
                }
            }

            return "与会支部："+temName;
        }

        public void setYhzb(String yhzb) {
            this.yhzb = yhzb;
        }

        public String getYhmd() {
            String temName="";
            if (meeradd!=null)
            {

                for (MeeraddBean meeraddBean:meeradd)
                {
                    if (meeraddBean.staffname!=null)
                    {
                        for (MeeraddBean.StaffnameBean staffnameBean:meeraddBean.staffname)
                        {
                            if (!temName.contains(staffnameBean.getStaffname()))
                            {
                                temName+=(","+staffnameBean.getStaffname());
                            }
                        }
                    }
                }
            }
            return "与会名单："+temName;
        }

        public void setYhmd(String yhmd) {
            this.yhmd = yhmd;
        }

        public String getType() {
            return signhtml.equals("0")?"NEW":(signhtml.equals("2")?"纪要":"");
        }

        public String getSignhtml() {
            return signhtml;
        }

        public void setSignhtml(String signhtml) {
            this.signhtml = signhtml;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getMeetingissue() {
            return meetingissue;
        }

        public String getShowType() {
            return "【"+meetingtype+"】"+meetingname;
        }

        public void setShowType(String showType) {
            this.showType = showType;
        }

        public String getShowTime() {
            return "会议时间："+(meetingstarttime!=null&&meetingstarttime.length()>15?meetingstarttime.substring(0,16):"")+"-"+((meetingstoptime!=null&&meetingstoptime.length()>15)?meetingstoptime.substring(11,16):"");
        }

        public void setShowTime(String showTime) {
            this.showTime = showTime;
        }

        public String getShowAddress() {
            return "会议地址："+meetingplace;
        }

        public void setShowAddress(String showAddress) {
            this.showAddress = showAddress;
        }

        public static class AttachinfoBean implements Serializable{

       /**
        * id : 20190811205345164806
        * filepath : /nbfp/templates/file/2019/08/11/目录页_详情页.jpg
        * orginname : 目录页_详情页.jpg
        */

       private String id;
       private String filepath;
       private String orginname;
       private String fileSize;

            public String getFileSize() {
                return ((int)(Math.random()*180))+"K";
            }

            public void setFileSize(String fileSize) {
                this.fileSize = fileSize;
            }

            public String getId() {
           return id;
       }

       public void setId(String id) {
           this.id = id;
       }

       public String getFilepath() {
           return filepath;
       }

       public void setFilepath(String filepath) {
           this.filepath = filepath;
       }

       public String getOrginname() {
           return orginname;
       }

       public void setOrginname(String orginname) {
           this.orginname = orginname;
       }
   }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getMeetingname() {
            return meetingname;
        }

        public void setMeetingname(String meetingname) {
            this.meetingname = meetingname;
        }

        public String getMeetingtype() {
            return meetingtype;
        }

        public void setMeetingtype(String meetingtype) {
            this.meetingtype = meetingtype;
        }

        public String getMeetingstarttime() {
            return meetingstarttime;
        }

        public void setMeetingstarttime(String meetingstarttime) {
            this.meetingstarttime = meetingstarttime;
        }

        public String getMeetingstoptime() {
            return meetingstoptime;
        }

        public void setMeetingstoptime(String meetingstoptime) {
            this.meetingstoptime = meetingstoptime;
        }

        public String getMeetingplace() {
            return meetingplace;
        }

        public void setMeetingplace(String meetingplace) {
            this.meetingplace = meetingplace;
        }


        public String getSigncolumn() {
            return signcolumn;
        }

        public void setSigncolumn(String signcolumn) {
            this.signcolumn = signcolumn;
        }

        public List<MeeraddBean> getMeeradd() {
            return meeradd;
        }

        public void setMeeradd(List<MeeraddBean> meeradd) {
            this.meeradd = meeradd;
        }


        public void setMeetingissue(String meetingissue) {
            this.meetingissue = meetingissue;
        }

        public List<AttachinfoBean> getAttachinfos() {
            return attachinfos;
        }

        public void setAttachinfos(List<AttachinfoBean> attachinfos) {
            this.attachinfos = attachinfos;
        }

        public static class MeeraddBean implements Serializable{
            /**
             * groupid : 101
             * groupname : 党支部
             * staffname : [{"staffname":"张三","staffid":"1001"}]
             */

            private String groupid;
            private String groupname;
            private List<StaffnameBean> staffname;

            public String getGroupid() {
                return groupid;
            }

            public void setGroupid(String groupid) {
                this.groupid = groupid;
            }

            public String getGroupname() {
                return groupname;
            }

            public void setGroupname(String groupname) {
                this.groupname = groupname;
            }

            public List<StaffnameBean> getStaffname() {
                return staffname;
            }

            public void setStaffname(List<StaffnameBean> staffname) {
                this.staffname = staffname;
            }

            public static class StaffnameBean implements Serializable{
                /**
                 * staffname : 张三
                 * staffid : 1001
                 */

                private String staffname;
                private String staffid;

                public String getStaffname() {
                    return staffname;
                }

                public void setStaffname(String staffname) {
                    this.staffname = staffname;
                }

                public String getStaffid() {
                    return staffid;
                }

                public void setStaffid(String staffid) {
                    this.staffid = staffid;
                }
            }
        }
    }
}
